\subsection{General Structure}\label{implementation:structure}
To sum up the features and functionality described in Sections \ref{Implementation:videodata} and \ref{Implementation:coding_considerations}, a general software structure is illustrated in Figure \ref{fig:software_functionality}. The structure is based on a server-node setup where basically every process, at each layer, done to the source data on the server is reversed on the receiving node, with an exception of video coding, where the video encoding is done before-hand and kept in the server's storage. The server should be able to display the original video.

\begin{figure}[h!]
\centering
	\begin{tikzpicture}[>=stealth',shorten >=1pt,auto, semithick]
	\tikzstyle{every state}=[rectangle,minimum height=1.0cm, minimum width=3cm, node distance=1.5cm,align=center,font=\footnotesize]

		\node[state, minimum width=6.8cm]  (16) {WLAN};
		\node[state, draw=white, left of=16, xshift=-0.4cm]  (16l) {};
		\node[state, draw=white, right of=16, xshift=0.4cm]  (16r) {};
		\node[state, minimum width=6.8cm]  (16) {WLAN};
		
		\node[state, left of=16, above of=16, xshift=-0.4cm]  (15) {Network interface};
		\node[state, above of=15] (14)  {Network coding};
		\node[state, above of=14] (13) {Serialiser};
		\node[state, above of=13] (12) {FFmpeg};
		\node[state, above of=12] (11) {Display (Qt)};
		\node[state, above of=11, draw=none, yshift=-.5cm] (server) {Server};
		\node[state, left of=12,node distance=3.75cm] (10) {Video data};

		\draw[dashed,draw=black!30,-] ([xshift=0.25cm, yshift=0.25cm]11.north east) -| ([xshift=-0.25cm, yshift=-0.25cm]15.south west) -| ([xshift=0.25cm, yshift=0.25cm]11.north east);

		\path	(10)	edge[->] node {}	(12);									
		\path	(12)	edge[->] node {}	(11);
		\path	(12)  edge[->] node {}	(13);
		\path	(13)	edge[->] node {}	(14);
		\path	(14)	edge[->] node {} (15);
		\path	(15)	edge[->] node {} (16l);

		\node[state, right of=16, above of=16, xshift=0.4cm]  (25) {Network interface};
		\node[state, above of=25] (24)  {Network coding};
		\node[state, above of=24] (23) {Deserialiser};
		\node[state, above of=23] (22) {FFmpeg};		
		\node[state, above of=22] (21) {Display (Qt)};
		\node[state, above of=21, xshift=0.5cm, draw=none] (nodes) {Nodes};

		\draw[dashed,draw=black!30,-] ([xshift=-0.25cm, yshift=0.25cm]21.north west) -| ([xshift=0.25cm, yshift=-0.25cm]25.south east) -| ([xshift=-0.25cm, yshift=0.25cm]21.north west);
		\draw[dashed,draw=black!30,-] ([xshift=0cm, yshift=0.25cm]21.north west) -- ([xshift=0cm, yshift=0.5cm]21.north west) -| ([xshift=0.5cm, yshift=0cm]25.south east) -- ([xshift=0.25cm, yshift=0cm]25.south east);
		\draw[dashed,draw=black!30,-] ([xshift=0.25cm, yshift=0.5cm]21.north west) -- ([xshift=0.25cm, yshift=0.75cm]21.north west) -| ([xshift=0.75cm, yshift=0.25cm]25.south east) -- ([xshift=0.5cm, yshift=0.25cm]25.south east);

		\path	(22)  edge[->] node {}	(21);
		\path	(23)	edge[->] node {}	(22);
		\path	(24)	edge[->] node {} (23);
		\path	(25)	edge[->] node {} (24);
		\path	(16r)	edge[->] node {}	(25);

	\end{tikzpicture}
\caption{The path for video data to both the sink's and the source's display.}
\label{fig:software_functionality}
\end{figure}
